# PowerShell脚本创建简单的PNG图标
Add-Type -AssemblyName System.Drawing

# 创建不同尺寸的图标
$sizes = @(16, 48, 128)

foreach ($size in $sizes) {
    # 创建一个新的位图
    $bitmap = New-Object System.Drawing.Bitmap($size, $size)
    $graphics = [System.Drawing.Graphics]::FromImage($bitmap)
    
    # 设置高质量绘图
    $graphics.SmoothingMode = [System.Drawing.Drawing2D.SmoothingMode]::AntiAlias
    
    # 创建画笔和笔刷
    $blueBrush = New-Object System.Drawing.SolidBrush([System.Drawing.Color]::FromArgb(66, 133, 244))
    $whiteBrush = New-Object System.Drawing.SolidBrush([System.Drawing.Color]::White)
    
    # 绘制蓝色圆形背景
    $circleRect = New-Object System.Drawing.Rectangle(0, 0, $size, $size)
    $graphics.FillEllipse($blueBrush, $circleRect)
    
    # 绘制白色图标 (简化的浏览器图标)
    $centerX = $size / 2
    $centerY = $size / 2
    $radius = $size * 0.3
    
    $graphics.FillEllipse($whiteBrush, $centerX - $radius, $centerY - $radius, $radius * 2, $radius * 2)
    
    # 保存图标
    $bitmap.Save("images/icon$size.png", [System.Drawing.Imaging.ImageFormat]::Png)
    
    # 释放资源
    $graphics.Dispose()
    $bitmap.Dispose()
}

Write-Host "图标已创建: icon16.png, icon48.png, icon128.png"